Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lcov): remove uncovered but skipped lines #752

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

djedje72
Copy link

Reporter lcovonly for .lcov files should force coverage for uncovered but skipped lines in collector map.
This will allow SonarQube or other analysis tools that use lcov files to show good coverage measurements.

@djedje72 djedje72 changed the title fix(lcov): remove uncovered but skipped lines feat(lcov): remove uncovered but skipped lines Jan 19, 2017
@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 97.525% when pulling 6d0e071 on djedje72:lcovonly-fix-skipped into 89e338f on gotwarlost:master.

@clakech
Copy link

clakech commented Jun 26, 2017

🆙

meta = functionMap[key],
covered = stats > 0,
skipped = meta.skip;
writer.println('FNDA:' + [ (covered || !skipped) ? stats : 1, meta.name ].join(','));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quite hare to read, maybe create a var on previous line for (covered || !skipped) ? stats : 1

writer.println('BRDA:' + [line, key, i, b].join(','));
covered = b > 0;
skipped = meta.locations && meta.locations[i] && meta.locations[i].skip;
writer.println('BRDA:' + [line, key, i, (covered || !skipped) ? b : 1].join(','));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quite hare to read, maybe create a var on previous line for (covered || !skipped) ? b : 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants